package org.nw.exception;

/**
 * 这种是实际上也业务异常，只是这种异常一定是以json格式返回，而不是跳转到某个错误页面
 * 
 * @author xuqc
 * @date 2013-9-14 下午01:45:14
 */
public class JsonException extends RuntimeException {
	private String msg;
	/**
	 * 
	 */
	private static final long serialVersionUID = 4150390542260541995L;

	/**
	 * Constructor for DataAccessException.
	 * 
	 * @param msg
	 *            the detail message
	 */
	public JsonException(String msg) {
		super(msg);
		this.msg = msg;
	}

	/**
	 * Constructor for DataAccessException.
	 * 
	 * @param msg
	 *            the detail message
	 * @param cause
	 *            the root cause (usually from using a underlying data access
	 *            API such as JDBC)
	 */
	public JsonException(String msg, Throwable cause) {
		super(msg, cause);
	}

	public JsonException(Throwable cause) {
		super(cause);
	}

	public String getBusiMessage() {
		return msg;
	}
}
